package com.ice.base.model;

import com.arcsoft.face.FaceFeature;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ice.body.dict.model.SysDept;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
@Component
@Data
public class SysLoginModel implements Serializable {

    private Integer id;
    
    @ApiModelProperty(value ="部门id")
    private Long deptId;

    @ApiModelProperty(value ="部门对象")
    private SysDept dept;

    @ApiModelProperty(value ="用户名(登录)")
    private String userName;

    @ApiModelProperty(value ="密码")
    private String passWord;

    @ApiModelProperty(value ="员工编号，与人脸设备中的人脸信息对应")
    private String userNo;

    @ApiModelProperty(value = "卡号")
    private String cardNo;

    @ApiModelProperty(value = "真实名字")
    private String realName;

    @ApiModelProperty(value = "手机号")
    private String phone;

    @ApiModelProperty(value ="是否开通人脸识别（0代表未开通，1代表已开通）")
    private Integer isFace;

    @ApiModelProperty(value ="否开通指纹验证（0代表未开通，1代表已开通）")
    private Integer isFinger;

    @ApiModelProperty(value ="是否审核角色 1是 0 不是")
    private String handRole;

    @ApiModelProperty(value ="人脸特征")
    private FaceFeature faceFeature;

    @ApiModelProperty(value ="人脸图片路径")
    private String facePath;

    @ApiModelProperty(value = "角色id")
    private String role_id;

    @ApiModelProperty(value = "实验室权限标志位,下发到设备用")
    private String warehouseFlag;

    @ApiModelProperty(value = "柜子编号权限")
    private String cabNos;

    @ApiModelProperty(value = "创建人")
    private String createBy;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "0 可用")
    private Integer delFlag;

    @ApiModelProperty(value = "角色id")
    private String roleId;


    //包含的角色
    private List<SysRoleModel> roles;

    // 最后一次登录日志
    private SysLoginLogModel lastLoginLog;

    public List<SysRoleModel> getRoles() {
        return roles;
    }


}
